<template>
  <div class="aside">
    <el-container style="height: 700px; border: 5px solid #eee">
      <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
        <el-menu :default-openeds="['1', '3']">
          <el-sub-menu index="1">
            <template #title>
              <el-icon><message /></el-icon>Navigator One
            </template>
            <el-menu-item-group>
              <template #title>图书管理系统</template>
              <el-menu-item index="1-1">
                <router-link class="gs-link" to="/book">图书管理</router-link>
              </el-menu-item>
              <el-menu-item index="1-2">
                <router-link class="gs-link" to="/category">分类管理</router-link>
              </el-menu-item>
            </el-menu-item-group>
          </el-sub-menu>
        </el-menu>
      </el-aside>

      <el-container>

        <el-main>
          <router-view/>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  name: 'App',
  mounted() {
    this.load();
  },
  methods:{
    load:function () {
      this.$router.push('/')
    }
  }
}
</script>

<style>
.aside{
  margin: 0;
  padding: 0;
}
</style>
